<?php
$menuList = common\services\MenuSve::getUserMenus();
?>
<div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
        <ul class="layui-nav layui-nav-tree">
            <?php foreach ($menuList as $menu): ?>
                <?php if (isset($menu['data']['is_show']) && !$menu['data']['is_show']) continue; ?>
                <li class="layui-nav-item <?= $menu['this'] ? 'layui-nav-itemed' : '' ?>">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon"
                           style="font-size: 19px; vertical-align: middle;"><?= $menu['data']['icon']??'&#xe61f;' ?></i>
                        <cite><?= $menu['name'] ?></cite>
                        <span class="layui-nav-more"></span>
                    </a>
                    <dl class="layui-nav-child">
                        <?php foreach ($menu['child'] as $item): ?>
                            <?php if (isset($item['data']['is_show']) && !$item['data']['is_show']) continue; ?>
                            <dd class="<?= $item['this'] ? 'layui-this' : '' ?>">
                                <a href="<?= $item['route'] ?>">
                                    <i class="layui-icon"
                                       style="vertical-align: middle; margin-left: 24px;">&#xe63f;</i>
                                    <cite><?= $item['name'] ?></cite>
                                </a>
                            </dd>
                        <?php endforeach; ?>
                    </dl>
                </li>
            <?php endforeach; ?>
        </ul>
    </div>
</div>